package com.goldenautumn.prefabricate.business.service

import com.goldenautumn.prefabricate.business.entity.BasicList
import com.goldenautumn.prefabricate.business.entity.BasicPage
import com.goldenautumn.prefabricate.business.entity.CarPreviewInfo
import com.goldenautumn.prefabricate.business.entity.ExpressResp
import com.goldenautumn.prefabricate.business.entity.OrderDetailsReq
import com.goldenautumn.prefabricate.business.entity.OrderInfoVo
import com.goldenautumn.prefabricate.business.entity.OrderListResp
import com.goldenautumn.prefabricate.business.entity.RefundOrderDetailsReq
import com.goldenautumn.prefabricate.business.entity.RefundOrderInfoVo
import com.goldenautumn.prefabricate.utils.Constants.BASE_URL
import qncx.external.common.network.model.Page
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.QueryMap

interface OrderService {


    /***
     * 获取用户订单列表
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getOrderList(@QueryMap params:MutableMap<String,Any>): OrderListResp<OrderInfoVo>

    /***
     * 商品下单
     * @return
     */
    @GET("$BASE_URL")
    suspend fun onCreateOrder(@QueryMap map :HashMap<String,Any>): OrderInfoVo

    /***
     * 购物车提交预览
     * @return
     */
    @GET("$BASE_URL")
    suspend fun onCarPreview(@QueryMap map :HashMap<String,Any>): CarPreviewInfo

    /***
     * 购物车提交预览
     * @return
     */
    @POST("$BASE_URL")
    suspend fun onCarPreviewPOST(@QueryMap map :HashMap<String,Any>): Any

    /***
     * 取消订单
     * @return
     */
    @POST("$BASE_URL")
    suspend fun onOrderCanCel(@QueryMap map :HashMap<String,Any>): Any

    /**
     * 订单详情
     * @return
     */
    @POST("$BASE_URL")
    suspend fun onOrderDetails(@QueryMap map :HashMap<String,Any>): OrderDetailsReq

    /**
     * 订单详情
     * @return
     */
    @FormUrlEncoded
    @POST("$BASE_URL")
    suspend fun onOrderPay(@QueryMap map:HashMap<String,Any>,@FieldMap body:HashMap<String,Any>): Any

    /**
     * 确认收货
     * @return
     */
    @POST("$BASE_URL")
    suspend fun onOrderReceiving(@QueryMap map :HashMap<String,Any>): Any

    /***
     * 物流信息
     * @return
     */
    @GET("$BASE_URL")
    suspend fun expressInfo(@QueryMap map:HashMap<String,Any>): ExpressResp

    /***
     * 售后列表
     * @return
     */
    @GET("$BASE_URL")
    suspend fun refundList(@QueryMap map:HashMap<String,Any>): BasicPage<RefundOrderInfoVo>

    /***
     * 售后详情
     * @return
     */
    @GET("$BASE_URL")
    suspend fun refundDetails(@QueryMap map:HashMap<String,Any>): RefundOrderDetailsReq

    /***
     * 申请退款/退货
     * @return
     */
    @FormUrlEncoded
    @POST("$BASE_URL")
    suspend fun orderRefund(@QueryMap map:HashMap<String,Any>,@FieldMap body:HashMap<String,Any>): Any


}